#include <arpa/inet.h>
#include "def.h"

void 	printLog(struct sockaddr_in *client, const char *fmt, ...);
void 	silentLog(struct sockaddr_in *client, char *str);
void 	hexLog(char *tag, BYTE *data, int len, struct sockaddr_in *client);
int 	login_process(BYTE *buf, struct sockaddr_in *client);
int 	logout_process(BYTE *buf, struct sockaddr_in *client);
int     connectDB(void);
void    closeDB(void);
int 	verifyUser(char *uid, char *pwd);
short 	allocatePort(char *uid, char *addr);
short	checkPort(char *uid);
void 	freePort(char *uid);
char* 	getOS(char *uid);

